<#import "../_layout.ftl" as layout>
${Html.s("pagetitle","编辑配置")}
<@layout._layout>
    <div class="head">
        <div class="title">
            编辑配置 ${Html.help("编辑配置")}
        </div>
    </div>
    <div>
        <ul class="mydetail">
            <li>
                <label>配置键</label>
                <input class="mylongtext" type="text" id="m_key" name="m_key" value="${model.m_key!}" />
            </li>
            <li>
                <label>配置值</label>
                <input class="mylongtext" type="text" id="m_value" name="m_value" value="${model.m_value!}" />
            </li>
            <li>
                <label>备注</label>
                <textarea id="remark" name="remark" rows="2" cols="2">${model.remark!}</textarea>
            </li>
            <li>
                <input type="button" class="btn1" style="" value="保存" onclick="return save()" />
            </li>
        </ul>
    </div>
    <script type="text/javascript">

        function save()
        {
            $.post("/sysconfig/save",
                {
                    "id": ${id!"0"},
                    "m_key": $("#m_key").val(),
                    "m_value": $("#m_value").val(),
                    "remark": $("#remark").val()
                },
                function (data) {
                    if (data.code < 0) {
                        alert(data.message);
                    } else {
                        window.location = '/sysconfig/index';
                    }
                }, "json");
        }

    </script>
</@layout._layout>